<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
	$(function(){
		$(window).scroll(function()
		{
			var h = $(window).scrollTop() + 300;
			$('#scroll').animate({'top':h},20);
		}); 
		
		
		$('#scroll').click(function(){
			
			$('#graybox').css('height',$(document).height());
			$('#content').css('opacity',0.3).show();
		})
		
	})
</script>
</head>

<body>

<div id="scroll" style="background:red; width:100px; height:100px; position:absolute; right:0; top:300px; z-index:99;">
</div>


<div id="content" style="background:blue; width:200px; height:200px; left:50%; margin-left:-100px; position:absolute; top:50%; margin-top:-100px; display:none; z-index:2"></div>
<div id="graybox" style="background:#000; width:100%; position:absolute; z-index:1;"></div>

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</body>
</html>
